<?xml version="1.0" encoding="utf-8"?>
<!--
                                                                                     
 h       t     t                ::       /     /                     t             / 
 h       t     t                ::      //    //                     t            // 
 h     ttttt ttttt ppppp sssss         //    //  y   y       sssss ttttt         //  
 hhhh    t     t   p   p s            //    //   y   y       s       t          //   
 h  hh   t     t   ppppp sssss       //    //    yyyyy       sssss   t         //    
 h   h   t     t   p         s  ::   /     /         y  ..       s   t    ..   /     
 h   h   t     t   p     sssss  ::   /     /     yyyyy  ..   sssss   t    ..   /     
                                                                                     
	<https://y.st./>
	Copyright © 2016 Alex Yst <mailto:copyright@y.st>

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program. If not, see <https://www.gnu.org./licenses/>.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="https://y.st./en/weblog/2016/02-February/18.xhtml"/>
		<title>Better spider debugging and list-based navigation &lt;https://y.st./en/weblog/2016/02-February/18.xhtml&gt;</title>
		<link rel="icon" type="image/png" href="/link/CC_BY-SA_4.0/y.st./icon.png"/>
		<link rel="stylesheet" type="text/css" href="/link/main.css"/>
		<script type="text/javascript" src="/script/javascript.js"/>
		<meta name="viewport" content="width=device-width"/>
	</head>
	<body>
<nav>
	<p>
		<a href="/en/coursework/">Coursework</a> |
		<a href="/en/take-down/">Take-down requests</a> |
		<a href="/en/">Home</a> |
		<a href="/en/a/about.xhtml">About</a> |
		<a href="/en/a/contact.xhtml">Contact</a> |
		<a href="/a/canary.txt">Canary</a> |
		<a href="/en/URI_research/"><abbr title="Uniform Resource Identifier">URI</abbr> research</a> |
		<a href="/en/opinion/">Opinions</a> |
		<a href="/en/law/">Law</a> |
		<a href="/en/recipe/">Recipes</a> |
		<a href="/en/a/links.xhtml">Links</a> |
		<a href="/en/weblog/2016/02-February/18.xhtml.asc">{this page}.asc</a>
	</p>
	<hr/>
	<p>
		Weblog index:
		<a href="/en/weblog/memories">Memories</a> |
		<a href="/en/weblog/"><abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars</a> |
		<a href="/en/weblog/index_ol_ascending.xhtml">Ascending list</a> |
		<a href="/en/weblog/index_ol_descending.xhtml">Descending list</a>
	</p>
	<hr/>
	<p>
		Jump to entry:
		<a href="/en/weblog/2015/03-March/07.xhtml">&lt;&lt;First</a>
		<a rel="prev" href="/en/weblog/2016/02-February/17.xhtml">&lt;Previous</a>
		<a rel="next" href="/en/weblog/2016/02-February/19.xhtml">Next&gt;</a>
		<a href="/en/weblog/latest.xhtml">Latest&gt;&gt;</a>
			</p>
			<hr/>
</nav>
		<header>
			<h1>Better spider debugging and list-based navigation</h1>
			<p>Day 00348: <time>Thursday, 2016 February 18</time></p>
		</header>
<p>
	Today, I checked in on the spider and found that it was about a week into working on the current website, had about an estimated week left, and had crashed.
	A week&apos;s worth of crawling efforts had been lost, and if I could find and fix the bug, it would take about a week to reach that page again to test the fix.
	Because of this, I set up a new feature that allows the administrator to specify a <abbr title="Uniform Resource Identifier">URI</abbr> to test on.
	Because of how the spider works, the specified <abbr title="Uniform Resource Identifier">URI</abbr> will be used third, right after the <code>robots.txt</code> and main index pages.
	It still means a lot less waiting and a lot less wasted effort.
	It appears that there was no bug for me to fix though, I had already fixed it and the page that the spider choked on before was no longer an issue.
	Most likely, I&apos;d fixed this but hadn&apos;t restarted the spider to make the fix come into effect due to the fact that restarting the spider would cause the spider to lose its progress on the current site.
</p>
<p>
	My initial plan was to implement the feature in such a way that if a debugging <abbr title="Uniform Resource Identifier">URI</abbr> is provided, <strong>*only*</strong> that page would be loaded and parsed.
	I was going to do this by having the debug switch set the queue variable to an object of a class that acted like an array, but just dropped any information given to it.
	However, it seems that even the most array-like object implementing all the relevant interfaces cannot be passed to <code>\array_pop()</code>, so after building that class, I ended up throwing it out.
</p>
<p>
	It turns out that the reason that the <a href="apt:atheme-services">atheme-services</a> package in Debian is so outdated isn&apos;t because the Debian package maintainers for that package stopped caring or have been too busy.
	It is because the Atheme team has requested that distribution maintainers only package their long-term support version! The copy in the Debian repositories is the latest long-term support version.
	It&apos;s a shame that this version doesn&apos;t support <abbr title="Next Generation IRC Daemon">ngIRCd</abbr>.
	I&apos;ll have to use a copy from outside the Debian repositories, which is something that I really don&apos;t like doing when choosing server software.
</p>
<p>
	Speaking of <abbr title="Internet Relay Chat">IRC</abbr>, I forgot that <a href="http://zdasgqu3geo7i7yj.onion/">The Unknown Man</a> and I had agreed to only allow encrypted connections to our network.
	Yesterday, I wrote about <abbr title="Uniform Resource Identifier">URI</abbr>s with the <code>irc:</code> and <code>irc6:</code> schemes, but those won&apos;t really be relevant to our network.
</p>
<p>
	Someone that prefers not to be mentioned by name has requested that I provide an index for my weblog that uses lists instead of <abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars.
	He thinks that they would be more accessible in text-based Web browsers than the <abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars.
	I disagree, but agreed to set up such an index.
	After agreeing to build such an index, I realized that while I still disagree that it will help in text-based Web browsers, it might actually be helpful for blind people using screen readers.
	With that in mind, I also added a <code>title</code> attribute to the links on the calender-based index page.
	I added both an ascending and descending list of entries.
</p>
<p>
	While trying to set up the set up the list-based version of the index, I ran into a problem that I have run into countless times before.
	The list has an order, so unordered lists are the incorrect thing to use semantically, but ordered lists don&apos;t work either because they stupidly index from one.
	If only I could use the <code>start</code> attribute! However, that attribute is deprecated in <abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 1.1, the latest version of the <abbr title="Extensible Hypertext Markup Language">XHTML</abbr> standard, or so I thought.
	I looked into it today to see it <abbr title="Extensible Hypertext Markup Language">XHTML</abbr>5 is any closer to finalization, and it seems that it was <a href="https://www.w3.org/TR/2014/REC-html5-20141028/">finalized</a> over a year ago.
	According to one article, <a href="http://www.pcworld.com/article/2840132/html5-finalized-finally.html">it took eight years to finalize it</a>.
	No wonder I gave up checking on it! I had kind of started wondering if <abbr title="Extensible Hypertext Markup Language">XHTML</abbr>5 would ever become an actual standard.
</p>
<p>
	It seems that <a href="apt:links">Links</a>, the Web browser that my friend uses, does not handle lists correctly.
	If you attempt to list from zero, Links uses bullet points instead of numbers.
	If you use a reverse list, Links will still count up instead of down.
	I never could find a solution to either issue.
	The problem with the reversed lists might be that they are a newish feature.
	However, list starting points are old enough that they have become deprecated and then undeprecated.
	There is no good reason not to support them fully.
	Thankfully, I found a workaround.
	It isn&apos;t as good as using the the <code>start</code> attribute of the <code>&lt;ol/&gt;</code> tag, but you can also use the <a href="https://www.impressivewebs.com/reverse-ordered-lists-html5/"><code>value</code> attribute of the <code>&lt;li/&gt;</code> tag</a>.
</p>
		<hr/>
		<p>
			Copyright © 2016 Alex Yst;
			You may modify and/or redistribute this document under the terms of the <a rel="license" href="/license/gpl-3.0-standalone.xhtml"><abbr title="GNU&apos;s Not Unix">GNU</abbr> <abbr title="General Public License version Three or later">GPLv3+</abbr></a>.
			If for some reason you would prefer to modify and/or distribute this document under other free copyleft terms, please ask me via email.
			My address is in the source comments near the top of this document.
			This license also applies to embedded content such as images.
			For more information on that, see <a href="/en/a/licensing.xhtml">licensing</a>.
		</p>
		<p>
			<abbr title="World Wide Web Consortium">W3C</abbr> standards are important.
			This document conforms to the <a href="https://validator.w3.org./nu/?doc=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2016%2F02-February%2F18.xhtml"><abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 5.2</a> specification and uses style sheets that conform to the <a href="http://jigsaw.w3.org./css-validator/validator?uri=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2016%2F02-February%2F18.xhtml"><abbr title="Cascading Style Sheets">CSS</abbr>3</a> specification.
		</p>
	</body>
</html>

